package com.aiwhose.aiwhosecore.bean.wechatgroup;

import com.aiwhose.aiwhosecore.bean.BaseEntity;
import com.mybatisflex.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.mybatisflex.core.keygen.KeyGenerators;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.util.List;

/**
 * 存储群类型的基本信息，包括每种类型的名称和管理员的二维码 实体类。
 *
 * @author 田国刚
 * @since 1.0.1
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Schema(description = "存储群类型的基本信息，包括每种类型的名称和管理员的二维码")
@Table(value = "wx_group_types")
public class WxGroupTypes extends BaseEntity implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键，群类型标识
     */
    @Id(keyType = KeyType.Generator, value = KeyGenerators.snowFlakeId)
    @Schema(description = "主键，群类型标识")
    private String id;

    /**
     * 群类型名称
     */
    @Schema(description = "群类型名称")
    private String typeName;

    /**
     * 归属人
     */
    @Schema(description = "归属人")
    private String possessor;

    /**
     * 管理员的个人二维码URL或二进制数据
     */
    @Schema(description = "管理员的个人二维码URL或二进制数据")
    private String adminQrCode;

    /**
     * 推荐二维码
     */
    @Schema(description = "推荐二维码")
    private String referralCode;


    /**
     * 二维码值
     */
    @Schema(description = "二维码值")
    private String qcValue;

    /**
     * 接收通知
     */
    @Schema(description = "接收通知")
    private boolean receiveMessage;

    @Schema(description = "群二维码列表")
    @RelationOneToMany(selfField = "id", targetField = "typeId")
    private List<WxGroupQr> wxGroupQrList;

}
